package net.towee.server.persistence;

import net.towee.server.authentication.ConfirmEntry;
import net.towee.shared.exceptions.PersistenceException;

/**
 * Interface for storing email confirm data
 * @author c58
 */
public interface ConfirmStore {
	/**
	 * Try to get confirm data by unique string. If entity not found
	 * it throws PersistenceException
	 * @param confirm
	 * @return
	 * @throws PersistenceException
	 */
	ConfirmEntry getConfirmEntry(String confirm) throws PersistenceException;
	
	/**
	 * Add new confirm entry
	 * @param entry
	 */
	void addConfirmEntry(ConfirmEntry entry);
	
	/**
	 * Remove confirm entry with give unique string
	 * @param confirm
	 * @return
	 */
	boolean removeConfirmEntry(String confirm);
}